import request from '@/utils/request'
export function getMealTableList(data) {
  return request({
    url: '/getMealTableList',
    method: 'post',
	data: data
  })
}
export function submitOrder(data) {
  return request({
    url: '/submitOrder',
    method: 'POST',
    data: data
  })
}
export function cancelOrder(data) {
  return request({
    url: '/cancelOrder',
    method: 'POST',
    data: data
  })
}
export function mealRecords(data){
	return request({
	  url: '/mealRecords',
	  method: 'POST',
	  data: data
	})
}
export function getDaliyOrderNumber(orderDate) {
	return request({
		url: '/mealRecords/statistics',
		method: 'GET',
		params: { orderDate }
	})
}
export function getMealDetails(orderDate, mealType, status) {
  // 处理状态映射（前端显示"临时餐"对应接口需要"临时用餐"）
  const apiStatus = status === '临时餐' ? '临时用餐' : status
  
  return request({
    url: '/mealRecords/details',
    method: 'GET',
    params: {
      orderDate,
      mealType,
      status: apiStatus
    }
  })
}